<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>弹性空间</title>
		<style>
			#box{
				height: 300px;
				border: 1px solid #000;
				/*新版弹性盒模型
				display: flex;*/
				
				/*老版的弹性盒模型*/
				display: -webkit-box;
				
				
			}
			#box div{
				width: 50px;
				height: 50px;
				background: purple;
				font-size: 30px;
				color: #fff;
			}
			
			#box div:nth-of-type(1){
				/*（新版）数值越小越靠前,可以接受0或负数*/
				/*order: 5;*/
				
				/*（老版）数值越小越靠前,最小值会默认变成1*/
				-webkit-box-ordinal-group: -2;
			}
			#box div:nth-of-type(2){
				/*order: 2;*/
				-webkit-box-ordinal-group: 1;
			}
			#box div:nth-of-type(3){
				/*order: 3;*/
				-webkit-box-ordinal-group: 0;
			}
			#box div:nth-of-type(4){
				/*order: -2;*/
				-webkit-box-ordinal-group: 4;
			}
		</style>
	</head>
	<body>
		<div id="box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
		</div>
	</body>
</html>
